package cn.bitkit.assist.code;

import cn.bitkit.assist.code.vo.CodeVO;

/**
 * @author changbo
 */
public class CodeHelper {


    public static CodeVO all(Class<?> entityClass){
        return CodeVO.builder()
        .entityClass(entityClass)
        .createController(true)
        .createService(true)
        .createDTO(true)
        .createMapper(true)
        .createSql(true)
        .createWeb(true).build();
    }

    public static CodeVO onlyRepository(Class<?> entityClass){
        return CodeVO.builder()
                .entityClass(entityClass)
                .createController(false)
                .createService(false)
                .createDTO(false)
                .createMapper(true)
                .createSql(true)
                .createWeb(false).build();
    }

    public static CodeVO onlySql(Class<?> entityClass){
        return CodeVO.builder()
                .entityClass(entityClass)
                .createController(false)
                .createService(false)
                .createDTO(false)
                .createMapper(false)
                .createSql(true)
                .createWeb(false).build();
    }

    public static CodeVO onlyApi(Class<?> entityClass){
        return CodeVO.builder()
                .entityClass(entityClass)
                .createController(true)
                .createService(true)
                .createDTO(true)
                .createMapper(true)
                .createSql(true)
                .createWeb(false).build();
    }

    public static CodeVO onlyVue(Class<?> entityClass){
        return CodeVO.builder()
                .entityClass(entityClass)
                .createController(false)
                .createService(false)
                .createDTO(false)
                .createMapper(false)
                .createSql(false)
                .createWeb(true).build();
    }

}
